import { setCookie } from '@/utils/auth'
import { IUserState } from './state'

export const mutations = {
  SET_TOKEN: (state: IUserState, token: string) => {
    state.token = token
    setCookie('token', token)
  },
  SET_USERINFO: (state: IUserState, userInfo: any) => {
    state.userInfo = userInfo
    setCookie('userInfo', userInfo)
  }
}
